home *** CD-ROM | disk | FTP | other *** search
/ Point Programming 1 / PPROG1.ISO / pascal / swag / crt.swg / 0002_Set EGA-VGA Blink Bit.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-05-28  |  1.4 KB  |  45 lines

  1.  
  2.   Hi, Rolfi:
  3.  
  4. RM>Anybody know and easy way to do DarkGrey for a bkgrnd???
  5.  
  6.   ...You have to turn off the "blink-bit", if possible. This is
  7.   only available for CGA and EGA/VGA color text modes.
  8.  
  9.   (***** Turn the "blink-bit" on/off to allow 16 different background *)
  10.   (*     colors. (CGA ONLY!)                                          *)
  11.   (*                                                                  *)
  12.   procedure SetBlinkCGA({input } TurnOn : boolean);
  13.   begin
  14.     if TurnOn then
  15.       begin
  16.         mem[$0040:$0065] := (mem[$0040:$0065] AND (NOT $20));
  17.         port[$3D8] := $29
  18.       end
  19.     else
  20.       begin
  21.         mem[$0040:$0065] := (mem[$0040:$0065] OR $20);
  22.         port[$3D8] := $09
  23.       end
  24.   end;        (* SetBlinkCGA.                                         *)
  25.  
  26.  
  27.   (***** Turn the "blink-bit" on/off to allow 16 different background *)
  28.   (*     colors. (EGA or VGA ONLY!)                                   *)
  29.   (*                                                                  *)
  30.   procedure SetBlinkEGAVGA({input } TurnOn : boolean);
  31.   begin
  32.     asm
  33.       mov ax, 1003h
  34.       mov bl, TurnOn
  35.       int 10h
  36.     end
  37.   end;        (* SetBlinkEGAVGA.                                      *)
  38.  
  39.                                - Guy
  40. ---
  41.  ■ DeLuxe²/386 1.25 #5060 ■
  42.  * Rose Media, Toronto, Canada : 416-733-2285
  43.  * PostLink(tm) v1.04  ROSE (#1047) : RelayNet(tm)
  44.  
  45.